<?php
/**
 * SaleViewModel
 *
 * @author Mike Gao
 */
class WholesaleViewModel extends ViewModel{
    protected $pk  = 'Wholesale.id';

    public $viewFields = array(
    	'Wholesale' => array('*'),
        
        'Wholesale_detail' => array('id'=>'did','number', 'price','product_id','total'=>'dtotal','create_time'=>'dctime','_on' => 'Wholesale.id = Wholesale_detail.wholesale_id'),
        //'Product' => array('id'=>'pid', 'name', 'tm','unit_id','cat_id','cost_default','minstock','_on' => 'Sale_detail.product_id = Product.id'),
        
    );


}
?>
